import {
  getUserInfoById
} from '../../api/index'
const app = getApp()
Page({
	data: {
		active: 0,
		logined: true,
		baseCls: 'page_account',
		avatar_icon: '/assets/images/avatar.png',
	},
	onLoad(options){
		var aideId = options.aideId;
    let that = this;
    getUserInfoById(aideId).then(res => {
      that.setData({
        aideInfo: res.data
      })
    })
	},
	//tab onc
	onShow: function() {
		let userInfo = wx.getStorageSync('userInfo');
		if (userInfo) {
			this.setData({
				logined: true,
				show: false,
				userInfo: userInfo
			})
		} else {
			this.setData({
				logined: false,
				show: true
			})
		}
	}
})